#pragma once

#include "../basics/basics.h"
#include "../math/functions.h"
#include "../engine/essential.h"
#include "../engine/dynamicarray.h"
#include "primitives.h"

// ================================================================================================
// Surface that contains a triangle as it's primitive
// ================================================================================================
class  TriangleSurface {
    
    private:

        Triangle triangle;     // -- original triangle

    public:

        // -- default constructor
        TriangleSurface();

        // -- lifetime
        TriangleSurface(/*const Color& col,*/ const Triangle& triangle);

        // -- accessor methods
        /*
        Color& GetColor();
        const Color& GetColor() const;
        */

        // -- public interface
        void Transform(Matrix4x4& mat);
        TriangleAcc CalcOptimized();
        TriangleAccDP CalcOptimized4x4();
};

// ================================================================================================
// Constructors
// ================================================================================================
inline TriangleSurface::TriangleSurface() : /*col(),*/ triangle() {
}

inline TriangleSurface::TriangleSurface(/*const Color& col_,*/ const Triangle& triangle_) :
                                        /*col(col_),*/ triangle(triangle_) {
}

/*
inline Color& TriangleSurface::GetColor() {
    return col;
}

inline const Color& TriangleSurface::GetColor() const { 
    return col;
}

*/